
//  ViewController.m
//  BASorterSelectedView
//
//  Created by Mr_zhang on 2017/9/13.
//  Copyright © 2017年 Mr_zhang. All rights reserved.
//

#import "ViewController.h"
#import "BASorterSelectedView.h"
#import "BAKit_SorterSelectedView.h"

#import <Masonry.h>

@interface ViewController ()

@property (nonatomic, strong) BAKit_SorterSelectedView *sorterSelectedView;
/** 全部 */
@property (nonatomic, strong) UIButton *wholeBtn;
/** 排序 */
@property (nonatomic, strong) UIButton *sortBtn;
/** 筛选 */
@property (nonatomic, strong) UIButton *screeningBtn;
/** 保存最后一个选中的按钮 */
@property (nonatomic, strong) UIButton *selectedBtn;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    _sorterSelectedView = [[BAKit_SorterSelectedView alloc] init];
    [self.view addSubview:_sorterSelectedView];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
}

- (void)viewDidLayoutSubviews
{
    [super viewDidLayoutSubviews];
    [_sorterSelectedView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@64);
        make.left.right.equalTo(@0);
        make.height.equalTo(@40);
    }];
}

//- (BAKit_SorterSelectedView *)sorterSelectedView
//{
//    if (!_sorterSelectedView)
//    {
//        _sorterSelectedView = [[BAKit_SorterSelectedView alloc] init];
//        [self.view addSubview:_sorterSelectedView];
//        
//        [_sorterSelectedView mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.left.right.top.equalTo(@0);
//            make.height.equalTo(@60);
//        }];
//    }
//    return _sorterSelectedView;
//}

@end
